package com.zzw.hj91;

import java.util.Scanner;

/**
 * @Project: hw_java
 * @Description: 走方格的方案数
 * @Author: zzw
 */

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static int findWays(int n, int m) {
        if (n == 1) {
            return m + 1;
        } else if (m == 1) {
            return n + 1;
        } else {
            return findWays(n, m - 1) + findWays(n - 1, m);
        }
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int result = findWays(n, m);
        System.out.print(result);

    }
}